package dS.ProjectGPS.LeicaOWI;

import javax.microedition.lcdui.*;

public class FormOwiPOB extends Form implements FormOwi {

  OWIAgent owiAgent = null;

  StringItem note1 = new StringItem("", "Press SET if system is now stationary over point of interest.", StringItem.PLAIN);

  public FormOwiPOB(OWIAgent o) {
    super("Point Occupation Begin");

    owiAgent = o;

    try {
      ndsInit();
    }
    catch (Exception ex) {
    }
  }

  public void ndsInit() throws Exception {
    append(note1);
  }

  public void update() {
    // N/A
  }

  public void save() {

    String msgId = "POB";

    // Setup SET parameters
    String[] outputs = {msgId};

    //Send message and update form if successful
    int ackCode = (owiAgent.set(msgId, OWI.setMessage(outputs)));
    Controller.showACKAlert(this, this, ackCode);
  }

}
